feat(copilot): add rtk init --agent copilot support#728
feat(copilot): add rtk init --agent copilot support#728jeziellopes wants to merge 1 commit intortk-ai:developfrom
Conversation
ed8bc50 to
83e2f8d
Compare
Implements PR rtk-ai#728 functionality with improvements: - rtk init --agent copilot installs both the hook JSON AND lean instructions - The hook (.github/hooks/rtk-rewrite.json) does the heavy lifting - Instructions file is minimal (~15 lines) to avoid context pollution - Uninstall removes instructions but preserves shared hook JSON - Idempotent: re-running is safe Unlike upstream PR rtk-ai#728 which only reports hook status, this version actually installs the hook JSON, making it a one-command setup. Signed-off-by: Daniel Gehriger <dgehriger@globusmedical.com>
df22aac to
e59e5a8
Compare
e59e5a8 to
d11c613
Compare
|
Updated PR to address review gaps and align with issue #823: Changes in this force-push:
Additional fixes (self-review, commit
Note on #824: PR #824 uses |
4ff3257 to
bd487d6
Compare
|
Hey We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes No logic changes — only file moves and import path updates. What you need to doRebase your branch on git fetch origin && git rebase origin/developGit detects renames automatically. If you get import conflicts, update the paths: use crate::git; // now: use crate::cmds::git::git;
use crate::tracking; // now: use crate::core::tracking;
use crate::config; // now: use crate::core::config;
use crate::init; // now: use crate::hooks::init;
use crate::gain; // now: use crate::analytics::gain;Need help rebasing? Tag @aeppling |
ad26930 to
fe1cbf3
Compare
|
Rebased onto Changes to accommodate the new folder structure:
1129 tests pass, 0 clippy errors. |
Adds GitHub Copilot to the AgentTarget enum, following the existing --agent cline/windsurf/cursor pattern. Closes rtk-ai#823. - AgentTarget::Copilot in src/main.rs + routing - run_copilot_mode(): creates .github/hooks/rtk-rewrite.json and .github/copilot-instructions.md; idempotent (skips if already set) - PATH check via crate::utils::tool_exists() (cross-platform, no which) - uninstall: strips only RTK section, preserves pre-existing user content - show_config(): [ok]/[--] status for both .github files + usage line - Fix rtk-rewrite.json: rtk hook -> rtk hook copilot (embedded via include_str! so the installed hook is always correct) - Register hook in RTK_META_COMMANDS so rtk hook copilot routes correctly instead of falling through to passthrough mode Signed-off-by: Jeziel Lopes <jeziel@example.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fe1cbf3 to
ca69951
Compare
Summary
Adds
--agent copilottortk init, extending the existingAgentTargetenum (cline/windsurf/cursor) with GitHub Copilot support. Closes #823.What this adds on top of
--copilot--copilot(merged)--agent copilot(this PR)--agent cline/windsurf)AgentTarget::Copilottool_exists()(cross-platform)show_config()status[ok]/[--]for both .github filesChanges
src/main.rsAgentTarget::Copilotenum variant;"hook"added toRTK_META_COMMANDS; routingsrc/init.rsrun_copilot_mode(), uninstall support,show_config()checks, 6 unit tests.github/hooks/rtk-rewrite.json"rtk hook"→"rtk hook copilot"(embedded viainclude_str!)CHANGELOG.md[Unreleased]entriesTesting